package com.chinasofti.demo3;

public class Granddad {
    public void drink(){
        System.out.println("爷爷爱喝酒");
    }
}
class  Father extends  Granddad{
    public void smoke(){
        System.out.println("爸爸爱抽烟");
    }
}
class  Son extends   Father{
    public static void main(String[] args) {
        Son son = new Son();
        son.drink();
        son.smoke();
    }
}